package com.xzxy.xmlg_backend.service.impl;

import com.xzxy.xmlg_backend.entity.Announcements;
import com.xzxy.xmlg_backend.mapper.AnnouncementsMapper;
import com.xzxy.xmlg_backend.service.IAnnouncementsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 公告表 服务实现类
 * </p>
 *
 * @author 周毅盛
 * @since 2025-06-16
 */
@Service
public class AnnouncementsServiceImpl extends ServiceImpl<AnnouncementsMapper, Announcements> implements IAnnouncementsService {

    @Override
    public List<Announcements> list(Page<Announcements> page, LambdaQueryWrapper<Announcements> wrapper) {
        // 执行分页查询
        Page<Announcements> result = this.page(page, wrapper);
        return result.getRecords();
    }
}
